<div class="todo">
  <div class="title">
    <span>Angular TodoList</span>
  </div>
  <div class="todo-con">
    <input type="text" #AddTodoInput placeholder="add todo" [(ngModel)]="keyword"/>
    <button (click)="onAdd()" class="btn">添加</button>
  </div>
  <!-- <pre>
    {{todos|async|json}}
  </pre> -->
  <div class="list">
    <ul>
      <li *ngFor="let todo of todos | async">
        <div class="item">
          <span> {{ todo.title }}</span>
          <button (click)="deleteTodo(todo.id)" class="btn">删除</button>
        </div>
      </li>
    </ul>
  </div>
</div>